import { userInfoAPI } from '@/api/personal'

export default {
  namespaced: true,
  state () {
    return {
      data: ''
    }
  },
  mutations: {
    // 把数据存再vuex
    setData (state, res) {
      state.data = res
    }
  },
  actions: {
    async updateList (ctx) {
      const res = await userInfoAPI()
      ctx.commit('setData', res.data)
      console.log('vuex的actions方法执行了')
    }
  }
}
